package com.hps.kafka.controller;

import com.hps.kafka.service.MessageService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author heps
 * @date 2019/4/8 17:49
 */
@RestController
public class HelloController {

    private MessageService messageService;

    public HelloController(MessageService messageService) {
        this.messageService = messageService;
    }

    @GetMapping("/index")
    public String index() {
        messageService.sendMessage();
        return "success";
    }
}
